﻿

using QFramework;
using UnityEngine;
using UnityEngine.Tilemaps;

namespace ProjectChildhood
{
    public interface ITool
    {
        /// <summary>
        /// 工具名字
        /// </summary>
        string Name { get; }
                                                                       
        /// <summary>
        /// 作用范围
        /// </summary>
        int Range { get; }

        /// <summary>
        /// 工具使用条件
        /// </summary>
        bool Selectable(ToolData toolData);

        /// <summary>
        /// 工具使用逻辑
        /// </summary>
        void Use(ToolData toolData);
    }

    /// <summary>
    /// 工具所用相关数据
    /// </summary>
    public class ToolData
    {
        /// <summary>
        /// 存地块的容器(类二维数组)
        /// </summary>
        public EasyGrid<SoilData> ShowGrid { get; set; } 

        /// <summary>
        /// 工具作用的地块位置
        /// </summary>
        public Vector3Int CellPos { get; set; }

        /// <summary>
        /// 土地的Tilemap
        /// </summary>
        public Tilemap SoilTilemap { get; set; }

        /// <summary>
        /// 地块绘制钢笔
        /// </summary>
        public TileBase Pen { get; set; }

        /// <summary>
        /// 地块中心坐标
        /// </summary>
        public Vector3 GridCenterPos { get; set; }
    }
}
